<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/matmul.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">matmul.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="matmul_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef HELIB_MATMUL_H</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define HELIB_MATMUL_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_encrypted_array_8h.html">helib/EncryptedArray.h</a>&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">class </span>MatMulFullExec;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">// Abstract base class for representing a linear transformation on a full</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">// std::vector.</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full.html">   23</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_mat_mul_full.html">MatMulFull</a></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;{</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full.html#a9e54390ec03e317a58d0b3fd8e8f42e4">   26</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classhelib_1_1_mat_mul_full.html#a9e54390ec03e317a58d0b3fd8e8f42e4">~MatMulFull</a>() {}</div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full.html#a2cb02a67192332ea4346863d4b79a659">   27</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_mat_mul_full.html#a2cb02a67192332ea4346863d4b79a659">getEA</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full.html#a3756b03af13bd60273bb9501e3da182a">   28</a></span>&#160;  <span class="keyword">typedef</span> <a class="code" href="classhelib_1_1_mat_mul_full_exec.html">MatMulFullExec</a> <a class="code" href="classhelib_1_1_mat_mul_full.html#a3756b03af13bd60273bb9501e3da182a">ExecType</a>;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;};</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">// Concrete derived class that defines the matrix entries.</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> type&gt;</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full__derived.html">   33</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_mat_mul_full__derived.html">MatMulFull_derived</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_mat_mul_full.html">MatMulFull</a></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;{</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <a class="code" href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a>(type)</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="comment">// Get (i, j) entry of matrix.</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  <span class="comment">// Should return true when the entry is a zero.</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full__derived.html#a0d806cc68adc10258385d4822ad2e8cb">   40</a></span>&#160;  virtual <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_mat_mul_full__derived.html#a0d806cc68adc10258385d4822ad2e8cb">get</a>(RX&amp; out, <span class="keywordtype">long</span> i, <span class="keywordtype">long</span> j) const = 0;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;};</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;class <a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html">BlockMatMulFullExec</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="comment">// Abstract base class for representing a block linear transformation on a full</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="comment">// std::vector.</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full.html">   49</a></span>&#160;class <a class="code" href="classhelib_1_1_block_mat_mul_full.html">BlockMatMulFull</a></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;{</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full.html#a8cb4ed4e61ddaa5baf18634e94d40754">   52</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classhelib_1_1_block_mat_mul_full.html#a8cb4ed4e61ddaa5baf18634e94d40754">~BlockMatMulFull</a>() {}</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full.html#a207ce516279c4935f82df8d82c919fe4">   53</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_block_mat_mul_full.html#a207ce516279c4935f82df8d82c919fe4">getEA</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full.html#a35235be45d947d7e17d20b053d0853a5">   54</a></span>&#160;  <span class="keyword">typedef</span> <a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html">BlockMatMulFullExec</a> <a class="code" href="classhelib_1_1_block_mat_mul_full.html#a35235be45d947d7e17d20b053d0853a5">ExecType</a>;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;};</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment">// Concrete derived class that defines the matrix entries.</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> type&gt;</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full__derived.html">   59</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_block_mat_mul_full__derived.html">BlockMatMulFull_derived</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_block_mat_mul_full.html">BlockMatMulFull</a></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  <a class="code" href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a>(type)</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <span class="comment">// Get (i, j) entry of matrix.</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <span class="comment">// Each entry is a d x d matrix over the base ring.</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <span class="comment">// Should return true when the entry is a zero.</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full__derived.html#a6a360c7beee7ac575df7253ea71df455">   67</a></span>&#160;  virtual <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_mat_mul_full__derived.html#a0d806cc68adc10258385d4822ad2e8cb">get</a>(mat_R&amp; out, <span class="keywordtype">long</span> i, <span class="keywordtype">long</span> j) const = 0;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;};</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160; </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;class <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html">MatMul1DExec</a>;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment">// Abstract base class for representing a 1D linear transformation.</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d.html">   75</a></span>&#160;class <a class="code" href="classhelib_1_1_mat_mul1_d.html">MatMul1D</a></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;{</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d.html#a02f561ab02f5c0bd55f9e0967d781657">   78</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classhelib_1_1_mat_mul1_d.html#a02f561ab02f5c0bd55f9e0967d781657">~MatMul1D</a>() {}</div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d.html#a1f3faa1ad35a049142bcc971af37e51f">   79</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_mat_mul1_d.html#a1f3faa1ad35a049142bcc971af37e51f">getEA</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d.html#ac91f82321e96d0c291470bb1efd95ba2">   80</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_mat_mul1_d.html#ac91f82321e96d0c291470bb1efd95ba2">getDim</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d.html#a692f59bd5635ab8d76c2a7c9cb7c3941">   81</a></span>&#160;  <span class="keyword">typedef</span> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html">MatMul1DExec</a> <a class="code" href="classhelib_1_1_mat_mul1_d.html#a692f59bd5635ab8d76c2a7c9cb7c3941">ExecType</a>;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;};</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment">// An intermediate class that is mainly intended for internal use.</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> type&gt;</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d__partial.html">   86</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_mat_mul1_d__partial.html">MatMul1D_partial</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_mat_mul1_d.html">MatMul1D</a></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;{</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <a class="code" href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a>(type)</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="comment">// Get the i&#39;th diagonal, encoded as a single constant.</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  <span class="comment">// MatMul1D_derived (below) supplies a default implementation,</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="comment">// which can be overridden in special circumstances.</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d__partial.html#ad713889a2aa799f55c849a4f3df03af4">   94</a></span>&#160;  virtual <span class="keywordtype">void</span> processDiagonal(RX&amp; poly,</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                               <span class="keywordtype">long</span> i,</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                               const <a class="code" href="classhelib_1_1_encrypted_array_derived.html">EncryptedArrayDerived</a>&lt;type&gt;&amp; ea) const = 0;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;};</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="comment">// Concrete derived class that defines the matrix entries.</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;template &lt;typename type&gt;</div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d__derived.html">  101</a></span>&#160;class <a class="code" href="classhelib_1_1_mat_mul1_d__derived.html">MatMul1D_derived</a> : public <a class="code" href="classhelib_1_1_mat_mul1_d__partial.html">MatMul1D_partial</a>&lt;type&gt;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;{</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  <a class="code" href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a>(type)</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <span class="comment">// Should return true if their are multiple (different) transforms</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <span class="comment">// among the various components.</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d__derived.html#a78460fa810ee5b4ff1d0e6f2a8d0b18e">  108</a></span>&#160;  virtual <span class="keywordtype">bool</span> multipleTransforms() const = 0;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160; </div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  <span class="comment">// Get coordinate (i, j) of the kth component.</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <span class="comment">// Should return true when the entry is a zero.</span></div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d__derived.html#acdb2c2b742c275f5b44d1ddee9493929">  112</a></span>&#160;  virtual <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_mat_mul_full__derived.html#a0d806cc68adc10258385d4822ad2e8cb">get</a>(RX&amp; out, <span class="keywordtype">long</span> i, <span class="keywordtype">long</span> j, <span class="keywordtype">long</span> k) const = 0;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="keywordtype">void</span> processDiagonal(RX&amp; poly,</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                       <span class="keywordtype">long</span> i,</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                       const <a class="code" href="classhelib_1_1_encrypted_array_derived.html">EncryptedArrayDerived</a>&lt;type&gt;&amp; ea) const override;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;};</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;class <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html">BlockMatMul1DExec</a>;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="comment">// Abstract base class for representing a block 1D linear transformation.</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d.html">  124</a></span>&#160;class <a class="code" href="classhelib_1_1_block_mat_mul1_d.html">BlockMatMul1D</a></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;{</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d.html#ab4ad2b0df8a09d38bf35e3cceb0c7e2c">  127</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d.html#ab4ad2b0df8a09d38bf35e3cceb0c7e2c">~BlockMatMul1D</a>() {}</div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d.html#a1980439e647d2420b790b98e3fdb0bb6">  128</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_block_mat_mul1_d.html#a1980439e647d2420b790b98e3fdb0bb6">getEA</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d.html#a7ec4e5e1ad2f32df30e141d5bb76ebd5">  129</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d.html#a7ec4e5e1ad2f32df30e141d5bb76ebd5">getDim</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d.html#a20055f7e66cf690a13afc2fca15370b5">  130</a></span>&#160;  <span class="keyword">typedef</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html">BlockMatMul1DExec</a> <a class="code" href="classhelib_1_1_block_mat_mul1_d.html#a20055f7e66cf690a13afc2fca15370b5">ExecType</a>;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;};</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="comment">// An intermediate class that is mainly intended for internal use.</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> type&gt;</div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d__partial.html">  135</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_block_mat_mul1_d__partial.html">BlockMatMul1D_partial</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d.html">BlockMatMul1D</a></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;{</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  <a class="code" href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a>(type)</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160; </div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  <span class="comment">// Get the i&#39;th diagonal, encoded as a std::vector of d constants,</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  <span class="comment">// where d is the order of p.</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  <span class="comment">// BlockMatMul1D_derived (below) supplies a default implementation,</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  <span class="comment">// which can be overridden in special circumstances.</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d__partial.html#a6348138c1f3d0bd046d6934744226bdd">  144</a></span>&#160;  virtual <span class="keywordtype">bool</span> processDiagonal(<a class="code" href="namespacestd.html">std</a>::vector&lt;RX&gt;&amp; poly,</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                               <span class="keywordtype">long</span> i,</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                               const <a class="code" href="classhelib_1_1_encrypted_array_derived.html">EncryptedArrayDerived</a>&lt;type&gt;&amp; ea) const = 0;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;};</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160; </div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="comment">// Concrete derived class that defines the matrix entries.</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;template &lt;typename type&gt;</div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d__derived.html">  151</a></span>&#160;class <a class="code" href="classhelib_1_1_block_mat_mul1_d__derived.html">BlockMatMul1D_derived</a> : public <a class="code" href="classhelib_1_1_block_mat_mul1_d__partial.html">BlockMatMul1D_partial</a>&lt;type&gt;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;{</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  <a class="code" href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a>(type)</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="comment">// Should return true if their are multiple (different) transforms</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <span class="comment">// among the various components.</span></div>
<div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d__derived.html#a0ca39e7c6031fca902ea27026831d6eb">  158</a></span>&#160;  virtual <span class="keywordtype">bool</span> multipleTransforms() const = 0;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160; </div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  <span class="comment">// Get coordinate (i, j) of the kth component.</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;  <span class="comment">// Each entry is a d x d matrix over the base ring.</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  <span class="comment">// Should return true when the entry is a zero.</span></div>
<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d__derived.html#a0946ebfe18b48ad39339199fcd561c00">  163</a></span>&#160;  virtual <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_mat_mul_full__derived.html#a0d806cc68adc10258385d4822ad2e8cb">get</a>(mat_R&amp; out, <span class="keywordtype">long</span> i, <span class="keywordtype">long</span> j, <span class="keywordtype">long</span> k) const = 0;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;  <span class="keywordtype">bool</span> processDiagonal(<a class="code" href="namespacestd.html">std</a>::vector&lt;RX&gt;&amp; poly,</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;                       <span class="keywordtype">long</span> i,</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;                       const <a class="code" href="classhelib_1_1_encrypted_array_derived.html">EncryptedArrayDerived</a>&lt;type&gt;&amp; ea) const override;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;};</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;struct <a class="code" href="structhelib_1_1_const_multiplier.html">ConstMultiplier</a>;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="comment">// Defined in matmul.cpp.</span></div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="comment">// Holds a constant by which a ciphertext can be multiplied.</span></div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;<span class="comment">// Internally, it is represented as either zzX or a DoubleCRT.</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="comment">// The former occupies less space, but the latter makes for</span></div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="comment">// much faster multiplication.</span></div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160; </div>
<div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="structhelib_1_1_const_multiplier_cache.html">  179</a></span>&#160;struct <a class="code" href="structhelib_1_1_const_multiplier_cache.html">ConstMultiplierCache</a></div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;{</div>
<div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="structhelib_1_1_const_multiplier_cache.html#a9d809a121eaf4d984a4f051b8eae9f5f">  181</a></span>&#160;  std::vector&lt;std::shared_ptr&lt;ConstMultiplier&gt;&gt; <a class="code" href="structhelib_1_1_const_multiplier_cache.html#a9d809a121eaf4d984a4f051b8eae9f5f">multiplier</a>;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  <span class="comment">// Upgrade zzX constants to DoubleCRT constants.</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;  <span class="keywordtype">void</span> upgrade(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_context.html">Context</a>&amp; context);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;};</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160; </div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="comment">// Abstract base case for multiplying an encrypted std::vector by a plaintext</span></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="comment">// matrix.</span></div>
<div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_exec_base.html">  191</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_mat_mul_exec_base.html">MatMulExecBase</a></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;{</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_exec_base.html#ab52bafc5c6e5a9cc54a5bb9db677be25">  194</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classhelib_1_1_mat_mul_exec_base.html#ab52bafc5c6e5a9cc54a5bb9db677be25">~MatMulExecBase</a>() {}</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160; </div>
<div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_exec_base.html#a1613d880499539fb020365db3e458987">  196</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_mat_mul_exec_base.html#a1613d880499539fb020365db3e458987">getEA</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  <span class="comment">// Upgrade zzX constants to DoubleCRT constants.</span></div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_exec_base.html#af7a43b1384b9c188ab228ea052351d2d">  199</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_mat_mul_exec_base.html#af7a43b1384b9c188ab228ea052351d2d">upgrade</a>() = 0;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;  <span class="comment">// If ctxt encrypts a row std::vector v, then this replaces ctxt</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  <span class="comment">// by an encryption of the row std::vector v*mat, where mat is</span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  <span class="comment">// a matrix provided to the constructor of one of the</span></div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;  <span class="comment">// concrete subclasses MatMul1DExec, BlockMatMul1DExec,</span></div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;  <span class="comment">// MatMulFullExec, BlockMatMulFullExec, defined below.</span></div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_exec_base.html#a68ecfac912aec8f5b6e6645998471e3a">  206</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_mat_mul_exec_base.html#a68ecfac912aec8f5b6e6645998471e3a">mul</a>(<a class="code" href="classhelib_1_1_ctxt.html">Ctxt</a>&amp; ctxt) <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;};</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160; </div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160; </div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="comment">// Class used to multiply an encrypted row std::vector by a 1D linear</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;<span class="comment">// transformation.</span></div>
<div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html">  213</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_mat_mul1_d_exec.html">MatMul1DExec</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_mat_mul_exec_base.html">MatMulExecBase</a></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;{</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#a0c3254fc1c6fadc61ec7c5cc98f53dd6">  216</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#a0c3254fc1c6fadc61ec7c5cc98f53dd6">ea</a>;</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#a6bd5738431a07f95386869a21a7b0c11">  218</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#a6bd5738431a07f95386869a21a7b0c11">dim</a>;</div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#a72f417de51aaac15794b7d7c584a3428">  219</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#a72f417de51aaac15794b7d7c584a3428">D</a>;</div>
<div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#a03a86ca6a5528d3381316a2a088cb388">  220</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#a03a86ca6a5528d3381316a2a088cb388">native</a>;</div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#af51275a18ff1d182fba01c3bf9982a36">  221</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#af51275a18ff1d182fba01c3bf9982a36">minimal</a>;</div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#a3c96dbb6f4268205a9787854ea230669">  222</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#a3c96dbb6f4268205a9787854ea230669">g</a>;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160; </div>
<div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#ae9323443a252952e160cc3aee842512a">  224</a></span>&#160;  <a class="code" href="structhelib_1_1_const_multiplier_cache.html">ConstMultiplierCache</a> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#ae9323443a252952e160cc3aee842512a">cache</a>;</div>
<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#a108665fe34b841764bc9767ceed0a7e2">  225</a></span>&#160;  <a class="code" href="structhelib_1_1_const_multiplier_cache.html">ConstMultiplierCache</a> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#a108665fe34b841764bc9767ceed0a7e2">cache1</a>; <span class="comment">// only for non-native dimension</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160; </div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;  <span class="comment">// The constructor encodes all the constants for a given</span></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;  <span class="comment">// matrix in zzX format.</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;  <span class="comment">// The mat argument defines the entries of the matrix.</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;  <span class="comment">// Use the upgrade method (below) to convert to DoubleCRT format.</span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  <span class="comment">// If the minimal flag is set to true, a strategy that relies</span></div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  <span class="comment">// on a minimal number of key switching matrices will be used;</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  <span class="comment">// this is intended for use in conjunction with the</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;  <span class="comment">// addMinimal{1D,Frb}Matrices routines declared in helib.h.</span></div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;  <span class="comment">// If the minimal flag is false, it is best to use the</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;  <span class="comment">// addSome{1D,Frb}Matrices routines declared in helib.h.</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html">MatMul1DExec</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_mat_mul1_d.html">MatMul1D</a>&amp; mat, <span class="keywordtype">bool</span> minimal = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160; </div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;  <span class="comment">// Replaces an encryption of row std::vector v by encryption of v*mat</span></div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a0cfe07d1b0c2f0e6385f2b6525e0a69b">mul</a>(<a class="code" href="classhelib_1_1_ctxt.html">Ctxt</a>&amp; ctxt) <span class="keyword">const override</span>;</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160; </div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;  <span class="comment">// Upgrades encoded constants from zzX to DoubleCRT.</span></div>
<div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#a304177669edbaaa7745c7c87be51c194">  243</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#a304177669edbaaa7745c7c87be51c194">upgrade</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    cache.<a class="code" href="structhelib_1_1_const_multiplier_cache.html#a47b215374e2dcb5f63d1976684f43930">upgrade</a>(ea.<a class="code" href="classhelib_1_1_encrypted_array.html#ada6929e7387f3fd6eb74ac762bbe1fcc">getContext</a>());</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    cache1.<a class="code" href="structhelib_1_1_const_multiplier_cache.html#a47b215374e2dcb5f63d1976684f43930">upgrade</a>(ea.<a class="code" href="classhelib_1_1_encrypted_array.html#ada6929e7387f3fd6eb74ac762bbe1fcc">getContext</a>());</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  }</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160; </div>
<div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul1_d_exec.html#a0da8c1a1683134544fab47d88bd3f476">  249</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_mat_mul1_d_exec.html#a0da8c1a1683134544fab47d88bd3f476">getEA</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> ea; }</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;};</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160; </div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160; </div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;<span class="comment">// Class used to multiply an encrypted row std::vector by a block 1D linear</span></div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="comment">// transformation.</span></div>
<div class="line"><a name="l00256"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html">  256</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html">BlockMatMul1DExec</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_mat_mul_exec_base.html">MatMulExecBase</a></div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;{</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#a2092d92d09acd5ee7a78fe86ed2eb2e0">  259</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#a2092d92d09acd5ee7a78fe86ed2eb2e0">ea</a>;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160; </div>
<div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#a5c7c6ed8e797333058793e593c7c8d82">  261</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#a5c7c6ed8e797333058793e593c7c8d82">dim</a>;</div>
<div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#a1a8a0e9a0bb58a601684b485d84e296b">  262</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#a1a8a0e9a0bb58a601684b485d84e296b">D</a>;</div>
<div class="line"><a name="l00263"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#a9b8f2df04d90f017b68f5625b2725b06">  263</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#a9b8f2df04d90f017b68f5625b2725b06">d</a>;</div>
<div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#af19f7e0186e779299543ff6f1ae43e1f">  264</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#af19f7e0186e779299543ff6f1ae43e1f">native</a>;</div>
<div class="line"><a name="l00265"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#a6ccf3e80758548ba36f2bd36a58c0376">  265</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#a6ccf3e80758548ba36f2bd36a58c0376">strategy</a>;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160; </div>
<div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#a1b6eb05c49776deacdc9bf5531765154">  267</a></span>&#160;  <a class="code" href="structhelib_1_1_const_multiplier_cache.html">ConstMultiplierCache</a> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#a1b6eb05c49776deacdc9bf5531765154">cache</a>;</div>
<div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#a02388d46bf9c3e08e7cb202eeb659857">  268</a></span>&#160;  <a class="code" href="structhelib_1_1_const_multiplier_cache.html">ConstMultiplierCache</a> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#a02388d46bf9c3e08e7cb202eeb659857">cache1</a>; <span class="comment">// only for non-native dimension</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160; </div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;  <span class="comment">// The constructor encodes all the constants for a given</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;  <span class="comment">// matrix in zzX format.</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;  <span class="comment">// The mat argument defines the entries of the matrix.</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;  <span class="comment">// Use the upgrade method (below) to convert to DoubleCRT format.</span></div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  <span class="comment">// If the minimal flag is set to true, a strategy that relies</span></div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  <span class="comment">// on a minimal number of key switching matrices will be used;</span></div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;  <span class="comment">// this is intended for use in conjunction with the</span></div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;  <span class="comment">// addMinimal{1D,Frb}Matrices routines declared in helib.h.</span></div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;  <span class="comment">// If the minimal flag is false, it is best to use the</span></div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;  <span class="comment">// addSome{1D,Frb}Matrices routines declared in helib.h.</span></div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html">BlockMatMul1DExec</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d.html">BlockMatMul1D</a>&amp; mat, <span class="keywordtype">bool</span> minimal = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160; </div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;  <span class="comment">// Replaces an encryption of row std::vector v by encryption of v*mat</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a0cfe07d1b0c2f0e6385f2b6525e0a69b">mul</a>(<a class="code" href="classhelib_1_1_ctxt.html">Ctxt</a>&amp; ctxt) <span class="keyword">const override</span>;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160; </div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  <span class="comment">// Upgrades encoded constants from zzX to DoubleCRT.</span></div>
<div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#a57066755fcb0bd1ae8ded8dfeb24eb28">  286</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#a57066755fcb0bd1ae8ded8dfeb24eb28">upgrade</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    cache.<a class="code" href="structhelib_1_1_const_multiplier_cache.html#a47b215374e2dcb5f63d1976684f43930">upgrade</a>(ea.<a class="code" href="classhelib_1_1_encrypted_array.html#ada6929e7387f3fd6eb74ac762bbe1fcc">getContext</a>());</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    cache1.<a class="code" href="structhelib_1_1_const_multiplier_cache.html#a47b215374e2dcb5f63d1976684f43930">upgrade</a>(ea.<a class="code" href="classhelib_1_1_encrypted_array.html#ada6929e7387f3fd6eb74ac762bbe1fcc">getContext</a>());</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  }</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160; </div>
<div class="line"><a name="l00292"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul1_d_exec.html#ac429810135e0baf67ab1b78063244e41">  292</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_block_mat_mul1_d_exec.html#ac429810135e0baf67ab1b78063244e41">getEA</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> ea; }</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;};</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160; </div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160; </div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;<span class="comment">// Class used to multiply an encrypted row std::vector by a full linear</span></div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="comment">// transformation.</span></div>
<div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full_exec.html">  299</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_mat_mul_full_exec.html">MatMulFullExec</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_mat_mul_exec_base.html">MatMulExecBase</a></div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;{</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00302"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full_exec.html#a4b3790908442687c409a9726a33b60a7">  302</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_mat_mul_full_exec.html#a4b3790908442687c409a9726a33b60a7">ea</a>;</div>
<div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full_exec.html#ad3f05b0168e4cc0f573484d6cdf2d80b">  303</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_mat_mul_full_exec.html#ad3f05b0168e4cc0f573484d6cdf2d80b">minimal</a>;</div>
<div class="line"><a name="l00304"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full_exec.html#af40cef0644449d1a88a4be557e6bd6fe">  304</a></span>&#160;  std::vector&lt;long&gt; <a class="code" href="classhelib_1_1_mat_mul_full_exec.html#af40cef0644449d1a88a4be557e6bd6fe">dims</a>;</div>
<div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full_exec.html#a99d01b4780ee28aa6205745282dd502b">  305</a></span>&#160;  std::vector&lt;MatMul1DExec&gt; <a class="code" href="classhelib_1_1_mat_mul_full_exec.html#a99d01b4780ee28aa6205745282dd502b">transforms</a>;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160; </div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;  <span class="comment">// The constructor encodes all the constants for a given</span></div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;  <span class="comment">// matrix in zzX format.</span></div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;  <span class="comment">// The mat argument defines the entries of the matrix.</span></div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;  <span class="comment">// Use the upgrade method (below) to convert to DoubleCRT format.</span></div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;  <span class="comment">// If the minimal flag is set to true, a strategy that relies</span></div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;  <span class="comment">// on a minimal number of key switching matrices will be used;</span></div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;  <span class="comment">// this is intended for use in conjunction with the</span></div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;  <span class="comment">// addMinimal{1D,Frb}Matrices routines declared in helib.h.</span></div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;  <span class="comment">// If the minimal flag is false, it is best to use the</span></div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;  <span class="comment">// addSome{1D,Frb}Matrices routines declared in helib.h.</span></div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_mat_mul_full_exec.html">MatMulFullExec</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_mat_mul_full.html">MatMulFull</a>&amp; mat, <span class="keywordtype">bool</span> minimal = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160; </div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;  <span class="comment">// Replaces an encryption of row std::vector v by encryption of v*mat</span></div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a0cfe07d1b0c2f0e6385f2b6525e0a69b">mul</a>(<a class="code" href="classhelib_1_1_ctxt.html">Ctxt</a>&amp; ctxt) <span class="keyword">const override</span>;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160; </div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;  <span class="comment">// Upgrades encoded constants from zzX to DoubleCRT.</span></div>
<div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full_exec.html#a6f1e801baca8e7970ddceee8a606a600">  323</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_mat_mul_full_exec.html#a6f1e801baca8e7970ddceee8a606a600">upgrade</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; t : transforms)</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;      t.upgrade();</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;  }</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160; </div>
<div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="classhelib_1_1_mat_mul_full_exec.html#a209a8d97b610bfa2e4128f2af33f47d0">  329</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_mat_mul_full_exec.html#a209a8d97b610bfa2e4128f2af33f47d0">getEA</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> ea; }</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160; </div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;  <span class="comment">// This really should be private.</span></div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;  <span class="keywordtype">long</span> rec_mul(<a class="code" href="classhelib_1_1_ctxt.html">Ctxt</a>&amp; acc, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_ctxt.html">Ctxt</a>&amp; ctxt, <span class="keywordtype">long</span> dim, <span class="keywordtype">long</span> idx) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;};</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160; </div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160; </div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;<span class="comment">// Class used to multiply an encrypted row std::vector by a full block linear</span></div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;<span class="comment">// transformation.</span></div>
<div class="line"><a name="l00339"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full_exec.html">  339</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html">BlockMatMulFullExec</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_mat_mul_exec_base.html">MatMulExecBase</a></div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;{</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00342"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full_exec.html#acd91f128c30f353a8a71e6c9880fb42b">  342</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html#acd91f128c30f353a8a71e6c9880fb42b">ea</a>;</div>
<div class="line"><a name="l00343"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full_exec.html#a844b528148aaa8a7c67e71a3153538c6">  343</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html#a844b528148aaa8a7c67e71a3153538c6">minimal</a>;</div>
<div class="line"><a name="l00344"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full_exec.html#a4bc25a11a016c238801914cf10e2e277">  344</a></span>&#160;  std::vector&lt;long&gt; <a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html#a4bc25a11a016c238801914cf10e2e277">dims</a>;</div>
<div class="line"><a name="l00345"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full_exec.html#a2337d7bb452a0465b476c73fd77da5f5">  345</a></span>&#160;  std::vector&lt;BlockMatMul1DExec&gt; <a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html#a2337d7bb452a0465b476c73fd77da5f5">transforms</a>;</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160; </div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;  <span class="comment">// The constructor encodes all the constants for a given</span></div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;  <span class="comment">// matrix in zzX format.</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;  <span class="comment">// The mat argument defines the entries of the matrix.</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;  <span class="comment">// Use the upgrade method (below) to convert to DoubleCRT format.</span></div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;  <span class="comment">// If the minimal flag is set to true, a strategy that relies</span></div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;  <span class="comment">// on a minimal number of key switching matrices will be used;</span></div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;  <span class="comment">// this is intended for use in conjunction with the</span></div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;  <span class="comment">// addMinimal{1D,Frb}Matrices routines declared in helib.h.</span></div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;  <span class="comment">// If the minimal flag is false, it is best to use the</span></div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;  <span class="comment">// addSome{1D,Frb}Matrices routines declared in helib.h.</span></div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html">BlockMatMulFullExec</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_block_mat_mul_full.html">BlockMatMulFull</a>&amp; mat,</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;                               <span class="keywordtype">bool</span> minimal = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160; </div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;  <span class="comment">// Replaces an encryption of row std::vector v by encryption of v*mat</span></div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a0cfe07d1b0c2f0e6385f2b6525e0a69b">mul</a>(<a class="code" href="classhelib_1_1_ctxt.html">Ctxt</a>&amp; ctxt) <span class="keyword">const override</span>;</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160; </div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;  <span class="comment">// Upgrades encoded constants from zzX to DoubleCRT.</span></div>
<div class="line"><a name="l00364"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full_exec.html#ac4f8e33d2645ef2774692563ec8189e7">  364</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html#ac4f8e33d2645ef2774692563ec8189e7">upgrade</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; t : transforms)</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;      t.upgrade();</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;  }</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160; </div>
<div class="line"><a name="l00370"></a><span class="lineno"><a class="line" href="classhelib_1_1_block_mat_mul_full_exec.html#abf77a300df1a404bb932e03936762635">  370</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a>&amp; <a class="code" href="classhelib_1_1_block_mat_mul_full_exec.html#abf77a300df1a404bb932e03936762635">getEA</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> ea; }</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160; </div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;  <span class="comment">// This really should be private.</span></div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;  <span class="keywordtype">long</span> rec_mul(<a class="code" href="classhelib_1_1_ctxt.html">Ctxt</a>&amp; acc, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_ctxt.html">Ctxt</a>&amp; ctxt, <span class="keywordtype">long</span> dim, <span class="keywordtype">long</span> idx) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;};</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160; </div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;<span class="comment">//===================================</span></div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160; </div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;<span class="comment">// ctxt = \sum_{i=0}^{d-1} \sigma^i(ctxt),</span></div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;<span class="comment">//   where d = order of p mod m, and \sigma is the Frobenius map</span></div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160; </div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#afc63b124cf6bc1dc82f4b599d373066c">traceMap</a>(Ctxt&amp; ctxt);</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160; </div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;<span class="comment">//====================================</span></div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160; </div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;<span class="comment">// These routines apply linear transformation to plaintext arrays.</span></div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;<span class="comment">// Mainly for testing purposes.</span></div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a0cfe07d1b0c2f0e6385f2b6525e0a69b">mul</a>(PlaintextArray&amp; pa, <span class="keyword">const</span> MatMul1D&amp; mat);</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a0cfe07d1b0c2f0e6385f2b6525e0a69b">mul</a>(PlaintextArray&amp; pa, <span class="keyword">const</span> BlockMatMul1D&amp; mat);</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a0cfe07d1b0c2f0e6385f2b6525e0a69b">mul</a>(PlaintextArray&amp; pa, <span class="keyword">const</span> MatMulFull&amp; mat);</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a0cfe07d1b0c2f0e6385f2b6525e0a69b">mul</a>(PlaintextArray&amp; pa, <span class="keyword">const</span> BlockMatMulFull&amp; mat);</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160; </div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;<span class="comment">// These are used mainly for performance evaluation.</span></div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160; </div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="namespacehelib.html#a443844fce5e8d1b68b5bbc11d7827836">fhe_test_force_bsgs</a>;</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;<span class="comment">// Controls whether or not we use BSGS multiplication.</span></div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;<span class="comment">// 1 to force on, -1 to force off, 0 for default behaviour.</span></div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160; </div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="namespacehelib.html#a4064daef7469afa9d911c7ba658e9285">fhe_test_force_hoist</a>;</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;<span class="comment">// Controls whether ot not we use hoisting.</span></div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;<span class="comment">// -1 to force off, 0 for default behaviour.</span></div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160; </div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160; </div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;<span class="preprocessor">#endif // ifndef HELIB_MATMUL_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_exec_html_a4bc25a11a016c238801914cf10e2e277"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full_exec.html#a4bc25a11a016c238801914cf10e2e277">helib::BlockMatMulFullExec::dims</a></div><div class="ttdeci">std::vector&lt; long &gt; dims</div><div class="ttdef"><b>Definition:</b> matmul.h:344</div></div>
<div class="ttc" id="anamespacehelib_html_a0cfe07d1b0c2f0e6385f2b6525e0a69b"><div class="ttname"><a href="namespacehelib.html#a0cfe07d1b0c2f0e6385f2b6525e0a69b">helib::mul</a></div><div class="ttdeci">void mul(const EncryptedArray &amp;ea, PlaintextArray &amp;pa, const PlaintextArray &amp;other)</div><div class="ttdef"><b>Definition:</b> EncryptedArray.cpp:1064</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_a02388d46bf9c3e08e7cb202eeb659857"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#a02388d46bf9c3e08e7cb202eeb659857">helib::BlockMatMul1DExec::cache1</a></div><div class="ttdeci">ConstMultiplierCache cache1</div><div class="ttdef"><b>Definition:</b> matmul.h:268</div></div>
<div class="ttc" id="astructhelib_1_1_const_multiplier_cache_html_a47b215374e2dcb5f63d1976684f43930"><div class="ttname"><a href="structhelib_1_1_const_multiplier_cache.html#a47b215374e2dcb5f63d1976684f43930">helib::ConstMultiplierCache::upgrade</a></div><div class="ttdeci">void upgrade(const Context &amp;context)</div><div class="ttdef"><b>Definition:</b> matmul.cpp:394</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_exec_base_html_ab52bafc5c6e5a9cc54a5bb9db677be25"><div class="ttname"><a href="classhelib_1_1_mat_mul_exec_base.html#ab52bafc5c6e5a9cc54a5bb9db677be25">helib::MatMulExecBase::~MatMulExecBase</a></div><div class="ttdeci">virtual ~MatMulExecBase()</div><div class="ttdef"><b>Definition:</b> matmul.h:194</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_html_ac91f82321e96d0c291470bb1efd95ba2"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d.html#ac91f82321e96d0c291470bb1efd95ba2">helib::MatMul1D::getDim</a></div><div class="ttdeci">virtual long getDim() const =0</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_a57066755fcb0bd1ae8ded8dfeb24eb28"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#a57066755fcb0bd1ae8ded8dfeb24eb28">helib::BlockMatMul1DExec::upgrade</a></div><div class="ttdeci">void upgrade() override</div><div class="ttdef"><b>Definition:</b> matmul.h:286</div></div>
<div class="ttc" id="anamespacehelib_html_a443844fce5e8d1b68b5bbc11d7827836"><div class="ttname"><a href="namespacehelib.html#a443844fce5e8d1b68b5bbc11d7827836">helib::fhe_test_force_bsgs</a></div><div class="ttdeci">int fhe_test_force_bsgs</div><div class="ttdef"><b>Definition:</b> matmul.cpp:23</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_html_a20055f7e66cf690a13afc2fca15370b5"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d.html#a20055f7e66cf690a13afc2fca15370b5">helib::BlockMatMul1D::ExecType</a></div><div class="ttdeci">BlockMatMul1DExec ExecType</div><div class="ttdef"><b>Definition:</b> matmul.h:130</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_a5c7c6ed8e797333058793e593c7c8d82"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#a5c7c6ed8e797333058793e593c7c8d82">helib::BlockMatMul1DExec::dim</a></div><div class="ttdeci">long dim</div><div class="ttdef"><b>Definition:</b> matmul.h:261</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_exec_html_abf77a300df1a404bb932e03936762635"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full_exec.html#abf77a300df1a404bb932e03936762635">helib::BlockMatMulFullExec::getEA</a></div><div class="ttdeci">const EncryptedArray &amp; getEA() const override</div><div class="ttdef"><b>Definition:</b> matmul.h:370</div></div>
<div class="ttc" id="astructhelib_1_1_const_multiplier_cache_html"><div class="ttname"><a href="structhelib_1_1_const_multiplier_cache.html">helib::ConstMultiplierCache</a></div><div class="ttdef"><b>Definition:</b> matmul.h:180</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_html_a1f3faa1ad35a049142bcc971af37e51f"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d.html#a1f3faa1ad35a049142bcc971af37e51f">helib::MatMul1D::getEA</a></div><div class="ttdeci">virtual const EncryptedArray &amp; getEA() const =0</div></div>
<div class="ttc" id="anamespacehelib_html_afc63b124cf6bc1dc82f4b599d373066c"><div class="ttname"><a href="namespacehelib.html#afc63b124cf6bc1dc82f4b599d373066c">helib::traceMap</a></div><div class="ttdeci">void traceMap(Ctxt &amp;ctxt)</div><div class="ttdef"><b>Definition:</b> matmul.cpp:2651</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html">helib::BlockMatMul1DExec</a></div><div class="ttdef"><b>Definition:</b> matmul.h:257</div></div>
<div class="ttc" id="aclasshelib_1_1_encrypted_array_html"><div class="ttname"><a href="classhelib_1_1_encrypted_array.html">helib::EncryptedArray</a></div><div class="ttdoc">A simple wrapper for a smart pointer to an EncryptedArrayBase. This is the interface that higher-leve...</div><div class="ttdef"><b>Definition:</b> EncryptedArray.h:1237</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_html_a35235be45d947d7e17d20b053d0853a5"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full.html#a35235be45d947d7e17d20b053d0853a5">helib::BlockMatMulFull::ExecType</a></div><div class="ttdeci">BlockMatMulFullExec ExecType</div><div class="ttdef"><b>Definition:</b> matmul.h:54</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_exec_base_html_a1613d880499539fb020365db3e458987"><div class="ttname"><a href="classhelib_1_1_mat_mul_exec_base.html#a1613d880499539fb020365db3e458987">helib::MatMulExecBase::getEA</a></div><div class="ttdeci">virtual const EncryptedArray &amp; getEA() const =0</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_html_a3756b03af13bd60273bb9501e3da182a"><div class="ttname"><a href="classhelib_1_1_mat_mul_full.html#a3756b03af13bd60273bb9501e3da182a">helib::MatMulFull::ExecType</a></div><div class="ttdeci">MatMulFullExec ExecType</div><div class="ttdef"><b>Definition:</b> matmul.h:28</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_exec_base_html_af7a43b1384b9c188ab228ea052351d2d"><div class="ttname"><a href="classhelib_1_1_mat_mul_exec_base.html#af7a43b1384b9c188ab228ea052351d2d">helib::MatMulExecBase::upgrade</a></div><div class="ttdeci">virtual void upgrade()=0</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_exec_html_af40cef0644449d1a88a4be557e6bd6fe"><div class="ttname"><a href="classhelib_1_1_mat_mul_full_exec.html#af40cef0644449d1a88a4be557e6bd6fe">helib::MatMulFullExec::dims</a></div><div class="ttdeci">std::vector&lt; long &gt; dims</div><div class="ttdef"><b>Definition:</b> matmul.h:304</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_html_a8cb4ed4e61ddaa5baf18634e94d40754"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full.html#a8cb4ed4e61ddaa5baf18634e94d40754">helib::BlockMatMulFull::~BlockMatMulFull</a></div><div class="ttdeci">virtual ~BlockMatMulFull()</div><div class="ttdef"><b>Definition:</b> matmul.h:52</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_ac429810135e0baf67ab1b78063244e41"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#ac429810135e0baf67ab1b78063244e41">helib::BlockMatMul1DExec::getEA</a></div><div class="ttdeci">const EncryptedArray &amp; getEA() const override</div><div class="ttdef"><b>Definition:</b> matmul.h:292</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_a6ccf3e80758548ba36f2bd36a58c0376"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#a6ccf3e80758548ba36f2bd36a58c0376">helib::BlockMatMul1DExec::strategy</a></div><div class="ttdeci">long strategy</div><div class="ttdef"><b>Definition:</b> matmul.h:265</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_a2092d92d09acd5ee7a78fe86ed2eb2e0"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#a2092d92d09acd5ee7a78fe86ed2eb2e0">helib::BlockMatMul1DExec::ea</a></div><div class="ttdeci">const EncryptedArray &amp; ea</div><div class="ttdef"><b>Definition:</b> matmul.h:259</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_html_a7ec4e5e1ad2f32df30e141d5bb76ebd5"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d.html#a7ec4e5e1ad2f32df30e141d5bb76ebd5">helib::BlockMatMul1D::getDim</a></div><div class="ttdeci">virtual long getDim() const =0</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_a1b6eb05c49776deacdc9bf5531765154"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#a1b6eb05c49776deacdc9bf5531765154">helib::BlockMatMul1DExec::cache</a></div><div class="ttdeci">ConstMultiplierCache cache</div><div class="ttdef"><b>Definition:</b> matmul.h:267</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_a1a8a0e9a0bb58a601684b485d84e296b"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#a1a8a0e9a0bb58a601684b485d84e296b">helib::BlockMatMul1DExec::D</a></div><div class="ttdeci">long D</div><div class="ttdef"><b>Definition:</b> matmul.h:262</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_a0c3254fc1c6fadc61ec7c5cc98f53dd6"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#a0c3254fc1c6fadc61ec7c5cc98f53dd6">helib::MatMul1DExec::ea</a></div><div class="ttdeci">const EncryptedArray &amp; ea</div><div class="ttdef"><b>Definition:</b> matmul.h:216</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_html_a02f561ab02f5c0bd55f9e0967d781657"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d.html#a02f561ab02f5c0bd55f9e0967d781657">helib::MatMul1D::~MatMul1D</a></div><div class="ttdeci">virtual ~MatMul1D()</div><div class="ttdef"><b>Definition:</b> matmul.h:78</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_a108665fe34b841764bc9767ceed0a7e2"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#a108665fe34b841764bc9767ceed0a7e2">helib::MatMul1DExec::cache1</a></div><div class="ttdeci">ConstMultiplierCache cache1</div><div class="ttdef"><b>Definition:</b> matmul.h:225</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_exec_html_a4b3790908442687c409a9726a33b60a7"><div class="ttname"><a href="classhelib_1_1_mat_mul_full_exec.html#a4b3790908442687c409a9726a33b60a7">helib::MatMulFullExec::ea</a></div><div class="ttdeci">const EncryptedArray &amp; ea</div><div class="ttdef"><b>Definition:</b> matmul.h:302</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d__partial_html"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d__partial.html">helib::BlockMatMul1D_partial</a></div><div class="ttdef"><b>Definition:</b> matmul.h:136</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_html"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d.html">helib::MatMul1D</a></div><div class="ttdef"><b>Definition:</b> matmul.h:76</div></div>
<div class="ttc" id="aclasshelib_1_1_encrypted_array_derived_html"><div class="ttname"><a href="classhelib_1_1_encrypted_array_derived.html">helib::EncryptedArrayDerived</a></div><div class="ttdoc">Derived concrete implementation of EncryptedArrayBase.</div><div class="ttdef"><b>Definition:</b> EncryptedArray.h:324</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full__derived_html"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full__derived.html">helib::BlockMatMulFull_derived</a></div><div class="ttdef"><b>Definition:</b> matmul.h:60</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_html_a1980439e647d2420b790b98e3fdb0bb6"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d.html#a1980439e647d2420b790b98e3fdb0bb6">helib::BlockMatMul1D::getEA</a></div><div class="ttdeci">virtual const EncryptedArray &amp; getEA() const =0</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_exec_html_acd91f128c30f353a8a71e6c9880fb42b"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full_exec.html#acd91f128c30f353a8a71e6c9880fb42b">helib::BlockMatMulFullExec::ea</a></div><div class="ttdeci">const EncryptedArray &amp; ea</div><div class="ttdef"><b>Definition:</b> matmul.h:342</div></div>
<div class="ttc" id="aclasshelib_1_1_encrypted_array_html_ada6929e7387f3fd6eb74ac762bbe1fcc"><div class="ttname"><a href="classhelib_1_1_encrypted_array.html#ada6929e7387f3fd6eb74ac762bbe1fcc">helib::EncryptedArray::getContext</a></div><div class="ttdeci">const Context &amp; getContext() const</div><div class="ttdef"><b>Definition:</b> EncryptedArray.h:1305</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_html_a2cb02a67192332ea4346863d4b79a659"><div class="ttname"><a href="classhelib_1_1_mat_mul_full.html#a2cb02a67192332ea4346863d4b79a659">helib::MatMulFull::getEA</a></div><div class="ttdeci">virtual const EncryptedArray &amp; getEA() const =0</div></div>
<div class="ttc" id="a_encrypted_array_8h_html"><div class="ttname"><a href="_encrypted_array_8h.html">EncryptedArray.h</a></div><div class="ttdoc">Data-movement operations on encrypted arrays of slots.</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_html_a207ce516279c4935f82df8d82c919fe4"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full.html#a207ce516279c4935f82df8d82c919fe4">helib::BlockMatMulFull::getEA</a></div><div class="ttdeci">virtual const EncryptedArray &amp; getEA() const =0</div></div>
<div class="ttc" id="a_p_algebra_8h_html_a3f121e88d1ede1fd384a8ad4ebb51f41"><div class="ttname"><a href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a></div><div class="ttdeci">#define PA_INJECT(typ)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:447</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_af51275a18ff1d182fba01c3bf9982a36"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#af51275a18ff1d182fba01c3bf9982a36">helib::MatMul1DExec::minimal</a></div><div class="ttdeci">bool minimal</div><div class="ttdef"><b>Definition:</b> matmul.h:221</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_exec_html_a6f1e801baca8e7970ddceee8a606a600"><div class="ttname"><a href="classhelib_1_1_mat_mul_full_exec.html#a6f1e801baca8e7970ddceee8a606a600">helib::MatMulFullExec::upgrade</a></div><div class="ttdeci">void upgrade() override</div><div class="ttdef"><b>Definition:</b> matmul.h:323</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_af19f7e0186e779299543ff6f1ae43e1f"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#af19f7e0186e779299543ff6f1ae43e1f">helib::BlockMatMul1DExec::native</a></div><div class="ttdeci">bool native</div><div class="ttdef"><b>Definition:</b> matmul.h:264</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_exec_html_a2337d7bb452a0465b476c73fd77da5f5"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full_exec.html#a2337d7bb452a0465b476c73fd77da5f5">helib::BlockMatMulFullExec::transforms</a></div><div class="ttdeci">std::vector&lt; BlockMatMul1DExec &gt; transforms</div><div class="ttdef"><b>Definition:</b> matmul.h:345</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_a3c96dbb6f4268205a9787854ea230669"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#a3c96dbb6f4268205a9787854ea230669">helib::MatMul1DExec::g</a></div><div class="ttdeci">long g</div><div class="ttdef"><b>Definition:</b> matmul.h:222</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_exec_html_a844b528148aaa8a7c67e71a3153538c6"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full_exec.html#a844b528148aaa8a7c67e71a3153538c6">helib::BlockMatMulFullExec::minimal</a></div><div class="ttdeci">bool minimal</div><div class="ttdef"><b>Definition:</b> matmul.h:343</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_exec_base_html_a68ecfac912aec8f5b6e6645998471e3a"><div class="ttname"><a href="classhelib_1_1_mat_mul_exec_base.html#a68ecfac912aec8f5b6e6645998471e3a">helib::MatMulExecBase::mul</a></div><div class="ttdeci">virtual void mul(Ctxt &amp;ctxt) const =0</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full__derived_html"><div class="ttname"><a href="classhelib_1_1_mat_mul_full__derived.html">helib::MatMulFull_derived</a></div><div class="ttdef"><b>Definition:</b> matmul.h:34</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d__derived_html"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d__derived.html">helib::MatMul1D_derived</a></div><div class="ttdef"><b>Definition:</b> matmul.h:102</div></div>
<div class="ttc" id="astructhelib_1_1_const_multiplier_cache_html_a9d809a121eaf4d984a4f051b8eae9f5f"><div class="ttname"><a href="structhelib_1_1_const_multiplier_cache.html#a9d809a121eaf4d984a4f051b8eae9f5f">helib::ConstMultiplierCache::multiplier</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; ConstMultiplier &gt; &gt; multiplier</div><div class="ttdef"><b>Definition:</b> matmul.h:181</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_exec_base_html"><div class="ttname"><a href="classhelib_1_1_mat_mul_exec_base.html">helib::MatMulExecBase</a></div><div class="ttdef"><b>Definition:</b> matmul.h:192</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_exec_html_ad3f05b0168e4cc0f573484d6cdf2d80b"><div class="ttname"><a href="classhelib_1_1_mat_mul_full_exec.html#ad3f05b0168e4cc0f573484d6cdf2d80b">helib::MatMulFullExec::minimal</a></div><div class="ttdeci">bool minimal</div><div class="ttdef"><b>Definition:</b> matmul.h:303</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_a0da8c1a1683134544fab47d88bd3f476"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#a0da8c1a1683134544fab47d88bd3f476">helib::MatMul1DExec::getEA</a></div><div class="ttdeci">const EncryptedArray &amp; getEA() const override</div><div class="ttdef"><b>Definition:</b> matmul.h:249</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_a304177669edbaaa7745c7c87be51c194"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#a304177669edbaaa7745c7c87be51c194">helib::MatMul1DExec::upgrade</a></div><div class="ttdeci">void upgrade() override</div><div class="ttdef"><b>Definition:</b> matmul.h:243</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_html_a692f59bd5635ab8d76c2a7c9cb7c3941"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d.html#a692f59bd5635ab8d76c2a7c9cb7c3941">helib::MatMul1D::ExecType</a></div><div class="ttdeci">MatMul1DExec ExecType</div><div class="ttdef"><b>Definition:</b> matmul.h:81</div></div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdef"><b>Definition:</b> Test_EvalMap.cpp:12</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_exec_html_a209a8d97b610bfa2e4128f2af33f47d0"><div class="ttname"><a href="classhelib_1_1_mat_mul_full_exec.html#a209a8d97b610bfa2e4128f2af33f47d0">helib::MatMulFullExec::getEA</a></div><div class="ttdeci">const EncryptedArray &amp; getEA() const override</div><div class="ttdef"><b>Definition:</b> matmul.h:329</div></div>
<div class="ttc" id="aclasshelib_1_1_context_html"><div class="ttname"><a href="classhelib_1_1_context.html">helib::Context</a></div><div class="ttdoc">Maintaining the parameters.</div><div class="ttdef"><b>Definition:</b> Context.h:58</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_html"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d.html">helib::BlockMatMul1D</a></div><div class="ttdef"><b>Definition:</b> matmul.h:125</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_exec_html_ac4f8e33d2645ef2774692563ec8189e7"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full_exec.html#ac4f8e33d2645ef2774692563ec8189e7">helib::BlockMatMulFullExec::upgrade</a></div><div class="ttdeci">void upgrade() override</div><div class="ttdef"><b>Definition:</b> matmul.h:364</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_html_ab4ad2b0df8a09d38bf35e3cceb0c7e2c"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d.html#ab4ad2b0df8a09d38bf35e3cceb0c7e2c">helib::BlockMatMul1D::~BlockMatMul1D</a></div><div class="ttdeci">virtual ~BlockMatMul1D()</div><div class="ttdef"><b>Definition:</b> matmul.h:127</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html">helib::MatMul1DExec</a></div><div class="ttdef"><b>Definition:</b> matmul.h:214</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_html"><div class="ttname"><a href="classhelib_1_1_mat_mul_full.html">helib::MatMulFull</a></div><div class="ttdef"><b>Definition:</b> matmul.h:24</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_a03a86ca6a5528d3381316a2a088cb388"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#a03a86ca6a5528d3381316a2a088cb388">helib::MatMul1DExec::native</a></div><div class="ttdeci">bool native</div><div class="ttdef"><b>Definition:</b> matmul.h:220</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_ae9323443a252952e160cc3aee842512a"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#ae9323443a252952e160cc3aee842512a">helib::MatMul1DExec::cache</a></div><div class="ttdeci">ConstMultiplierCache cache</div><div class="ttdef"><b>Definition:</b> matmul.h:224</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d__derived_html"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d__derived.html">helib::BlockMatMul1D_derived</a></div><div class="ttdef"><b>Definition:</b> matmul.h:152</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_exec_html"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full_exec.html">helib::BlockMatMulFullExec</a></div><div class="ttdef"><b>Definition:</b> matmul.h:340</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul1_d_exec_html_a9b8f2df04d90f017b68f5625b2725b06"><div class="ttname"><a href="classhelib_1_1_block_mat_mul1_d_exec.html#a9b8f2df04d90f017b68f5625b2725b06">helib::BlockMatMul1DExec::d</a></div><div class="ttdeci">long d</div><div class="ttdef"><b>Definition:</b> matmul.h:263</div></div>
<div class="ttc" id="aclasshelib_1_1_ctxt_html"><div class="ttname"><a href="classhelib_1_1_ctxt.html">helib::Ctxt</a></div><div class="ttdoc">A Ctxt object holds a single ciphertext.</div><div class="ttdef"><b>Definition:</b> Ctxt.h:270</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full__derived_html_a0d806cc68adc10258385d4822ad2e8cb"><div class="ttname"><a href="classhelib_1_1_mat_mul_full__derived.html#a0d806cc68adc10258385d4822ad2e8cb">helib::MatMulFull_derived::get</a></div><div class="ttdeci">virtual bool get(RX &amp;out, long i, long j) const =0</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d__partial_html"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d__partial.html">helib::MatMul1D_partial</a></div><div class="ttdef"><b>Definition:</b> matmul.h:87</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_a72f417de51aaac15794b7d7c584a3428"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#a72f417de51aaac15794b7d7c584a3428">helib::MatMul1DExec::D</a></div><div class="ttdeci">long D</div><div class="ttdef"><b>Definition:</b> matmul.h:219</div></div>
<div class="ttc" id="anamespacehelib_html_a4064daef7469afa9d911c7ba658e9285"><div class="ttname"><a href="namespacehelib.html#a4064daef7469afa9d911c7ba658e9285">helib::fhe_test_force_hoist</a></div><div class="ttdeci">int fhe_test_force_hoist</div><div class="ttdef"><b>Definition:</b> matmul.cpp:24</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul1_d_exec_html_a6bd5738431a07f95386869a21a7b0c11"><div class="ttname"><a href="classhelib_1_1_mat_mul1_d_exec.html#a6bd5738431a07f95386869a21a7b0c11">helib::MatMul1DExec::dim</a></div><div class="ttdeci">long dim</div><div class="ttdef"><b>Definition:</b> matmul.h:218</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_html_a9e54390ec03e317a58d0b3fd8e8f42e4"><div class="ttname"><a href="classhelib_1_1_mat_mul_full.html#a9e54390ec03e317a58d0b3fd8e8f42e4">helib::MatMulFull::~MatMulFull</a></div><div class="ttdeci">virtual ~MatMulFull()</div><div class="ttdef"><b>Definition:</b> matmul.h:26</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_exec_html_a99d01b4780ee28aa6205745282dd502b"><div class="ttname"><a href="classhelib_1_1_mat_mul_full_exec.html#a99d01b4780ee28aa6205745282dd502b">helib::MatMulFullExec::transforms</a></div><div class="ttdeci">std::vector&lt; MatMul1DExec &gt; transforms</div><div class="ttdef"><b>Definition:</b> matmul.h:305</div></div>
<div class="ttc" id="aclasshelib_1_1_mat_mul_full_exec_html"><div class="ttname"><a href="classhelib_1_1_mat_mul_full_exec.html">helib::MatMulFullExec</a></div><div class="ttdef"><b>Definition:</b> matmul.h:300</div></div>
<div class="ttc" id="aclasshelib_1_1_block_mat_mul_full_html"><div class="ttname"><a href="classhelib_1_1_block_mat_mul_full.html">helib::BlockMatMulFull</a></div><div class="ttdef"><b>Definition:</b> matmul.h:50</div></div>
<div class="ttc" id="astructhelib_1_1_const_multiplier_html"><div class="ttname"><a href="structhelib_1_1_const_multiplier.html">helib::ConstMultiplier</a></div><div class="ttdef"><b>Definition:</b> matmul.cpp:303</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
